<template>
	<div class="container w-3/4 mt-10">
		<ReservationDetail :data="data" :loading="loading"></ReservationDetail>
	</div>
</template>

<script setup lang="ts">
import { detail } from '@/apis/reservation';
import { useRequest } from 'vue-hooks-plus';

const route = useRoute();

const { loading, run, data } = useRequest((id: string) => detail(id), { manual: true });
watch(
	() => route.params,
	() => run(route.params.id + ''),
	{
		immediate: true,
	},
);
</script>

<style scoped></style>
